#include "GameObject.h"

std::vector<jfw::GameObject*> jfw::GameObject::GameObjectList;

jfw::GameObject::GameObject()
{
    jfw::GameObject::GameObjectList.push_back(this);
}

jfw::GameObject::~GameObject() { }

/*******************/

/*
jfw::GameObject::LoadDef(std::string Filename)
{

}
*/
/*******************/

void jfw::GameObject::Update(float m_fDeltaTime)
{
}

void jfw::GameObject::UpdateAll(float m_fDeltaTime)
{
    for(unsigned int i=0;GameObjectList.size()>i; ++i)
    {
        GameObjectList[i]->Update(m_fDeltaTime);
    }
}

void jfw::GameObject::DrawAll()
{
    for(unsigned int i=0; GameObjectList.size()>i; ++i)
    {
        pEngine->pApp->Draw( *(GameObjectList[i]) );
    }
}
